package org.happycomp.radio.scheduler;

import java.util.Date;

import org.happycomp.radio.downloader.Downloader;
import org.happycomp.radio.downloader.DownloadingItem;
import org.happycomp.radio.planner.Planner;

/**
 * Planovac spousti ukoly pro stahovani
 * @author pavels
 */
public interface Scheduler {

	/**
	 * Nastavni datum kdy se ma zhroutit svet..(ukonceni programu)
	 * @param date
	 */
	public void setShutdownSystemDate(Date date);
	
	/**
	 * Vraci nastaveny datum pro ukonceni programu
	 * @return
	 */
	public Date getShutdownSystemDate();
	
	public void scheduleCheck();
	public void addSchedulerListener(SchedulerListener listener);
	public void removeSchedulerListener(SchedulerListener listener);
	public SchedulerListener[] getSchedulerListeners();
	public void fireRefreshIterval();
	public void fireStopDownloading(DownloadingItem item);
	public void fireStartDownloading();
    public void fireShutDown();
	public void fireException(Throwable throwable);
	public Downloader getDownloader();
	public Planner getPlanner();
	public void start();
	public boolean isStarted();
}
